#!/bin/bash

# 定义可选参数
isotopes=("U238" "Th232")
libraries=("JENDL" "TENDL")
targets=("b10" "b11" "na23" "o18" "si30" "si29")

# 计数器，用于跟踪执行的组合数
count=0
total=$(( ${#isotopes[@]} * ${#libraries[@]} * ${#targets[@]} ))

# 嵌套循环遍历所有组合
for isotope in "${isotopes[@]}"; do
  for library in "${libraries[@]}"; do
    for target in "${targets[@]}"; do
      command="python3 plot_alphan.py $isotope $library $target"
      echo "执行命令 ($((++count))/$total): $command"
      $command
      # 检查命令是否成功
      if [ $? -eq 0 ]; then
        echo "成功: $command"
      else
        echo "失败: $command" >&2
      fi
    done
  done
done

echo "所有 $total 种组合执行完成"
